<div id="list">
<?php if (count($disciplina_list)): ?>
<table class="paginacao" cellpadding="2" cellspacing="0" width="100%" align="center">
	<tr>
		<td align="left"><?php $pager_layout->displayResultados(); ?></td>
		<td align="right"><?php $pager_layout->display(array('nourl'=>true)); ?></td>
	</tr>
</table>
<?php endif; ?>

<table class="list">
	<thead>
    <tr>
	    <th><?php echo $form['id_disciplina']->renderLabel() ?></th>
	    <th><?php echo $form['nm_disciplina']->renderLabel() ?></th>
	    <th><?php echo $form['ds_disciplina']->renderLabel() ?></th>
	    <th><?php echo $form['created_at']->renderLabel() ?></th>
	    <th><?php echo $form['updated_at']->renderLabel() ?></th>
		<th>Ações</th>
    </tr>
	</thead>
  	<tbody>
  	<?php if (!count($disciplina_list)): ?>
	<tr>
		<td align="center" colspan="6">NENHUM REGISTRO ENCONTRADO!</td>
	</tr>
	<?php endif; ?>
	<?php $i = 0; ?>
    <?php foreach ($disciplina_list as $disciplina): ?>
    <?php $bg = ($i++ % 2 == 0)? 'row0' : 'row1'; ?>
    <tr class="<?php echo $bg; ?>">
			    <td><a href="<?php echo url_for('disciplina/edit?id_disciplina='.$disciplina['id_disciplina']) ?>"><?php echo $disciplina['id_disciplina'] ?></a></td>
				    <td><?php echo $disciplina['nm_disciplina'] ?></td>
			    <td><?php echo $disciplina['ds_disciplina'] ?></td>
			    <td><?php echo $disciplina['created_at'] ?></td>
			    <td><?php echo $disciplina['updated_at'] ?></td>
			<td>
						    	<?php
            echo link_to(
                ' ',
                url_for('disciplina/edit?id_disciplina='.$disciplina['id_disciplina']),
                array('class'=>'icoEditar','title'=>'Editar disciplina')
            )
        ?>
    	<?php
            echo link_to(
                ' ',
                url_for('disciplina/delete?id_disciplina='.$disciplina['id_disciplina']),
                array('class'=>'icoExcluir','title'=>'Excluir disciplina', 'confirm' => 'Tem certeza que deseja Excluir?')
            )
        ?>
	</td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>
</div>